package org.morningangel.junittest;

import static org.junit.Assert.assertTrue;

import java.util.List;

import org.junit.Assert;
import org.junit.BeforeClass;
import org.junit.Test;
import org.morningangel.bean.Activity;
import org.morningangel.dao.ActivityDao;
import org.morningangel.dao.impl.ActivityDaoImpl;

public class TestActivityDao {
	protected static ActivityDao activityDao;
	@BeforeClass
	public static void setUpBeforeClass(){
		activityDao=new ActivityDaoImpl();
	}
	@Test
	public void testlistPage(){
		
		List<Activity> activityList=activityDao.listPage(4, 5, 1);
		System.out.println("id----title--------mainTmage-----url--------------");
		for(Activity activity:activityList){
			System.out.println(activity.getId()+"----"+activity.getTitle()+"--------"+activity.getMainImage()+"----------------"+activity.getUrl());
		}
		assertTrue(true);
	}
}
